/*
 * Background Container
 * Ensures the background image spans the entire viewport without affecting other elements.
 */
.form-background {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-image: url('/img/quote page img/Gemini_Generated_Image_9u6ysi9u6ysi9u6y.png'); /* Placeholder image for the form */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-radius: 0;
}

/*
 * Main Container for the Glassmorphic Form
 * Centers the content and applies the glassmorphism effect.
 */
.form-container {
    max-width: 90%;
    width: 500px;
    padding: 2.5rem;
    text-align: center;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Form and Input Styling */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative; /* Needed for positioning the highlight effect */
    transition: all 0.3s ease;
}

.form-group label, .form-heading, .form-text {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
}

.form-text {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: normal;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    box-sizing: border-box; /* Ensures padding doesn't affect total width */
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

/* Add hover and focus styles for the input and select elements */
.form-group input:hover,
.form-group input:focus,
.form-group select:hover,
.form-group select:focus {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    outline: none; /* Removes the default outline */
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group select option {
    background-color: #333;
    color: #fff;
}

/* Checklists and checkboxes styling */
.form-checklists {
    margin-top: 2rem;
    text-align: left;
}

.form-checklist-container {
    margin-top: 1rem;
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

.form-checklist-container h3 {
    margin-top: 0;
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.form-service-item {
    display: block;
    margin-bottom: 0.5rem;
}

.form-service-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Add Another Button */
.form-add-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-add-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Submit Button */
.form-submit-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Error message styling */
.form-error-message {
    color: #ff4d4d;
    font-weight: bold;
    margin-top: -1rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    min-height: 20px; /* Prevents layout shift */
}

/* Glassmorphic highlight and animation for the error state */
.form-error-highlight {
    animation: highlightFadeIn 0.5s ease-in-out;
    position: relative;
    z-index: 10;
}

.form-error-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    animation: pulseBorder 1.5s infinite ease-in-out;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: -1;
}

@keyframes highlightFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.9);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }
}

/*Wrapper for each generated section */
.section-wrapper {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Clear button styling */
.form-clear-btn {
    width: 100%;
    padding: 0.5rem;
    margin-top: 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
